
find_package(Libevent REQUIRED)

macro(add_libevent_example name)
    add_executable(${name} ${name}.c)
    target_link_libraries(${name} ${LIBEVENT_LIBRARIES})
endmacro()

add_libevent_example(version)
add_libevent_example(printBackendMethod)
add_libevent_example(event_base_get_method)
add_libevent_example(timer)
add_libevent_example(signal)
add_libevent_example(event_active)
add_libevent_example(timeUtil)
add_libevent_example(evutil_strtoll)
add_libevent_example(client_connect)
